import java.util.Scanner;

public class main_2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();

        //write your code here......
        if(a > b)
        {
            System.out.printf("%d %d %d %d %d",(int)a+b,(int)a-b,(int)a*b,(int)a/b,(int)a%b);
        }
        else
        {
            System.out.printf("%d %d %d %d %d",(int)a+b,(int)b-a,(int)a*b,(int)b/a,(int)b%a);
        }
        

    }
}